package com.xw.qxypt.modules.controller;

import com.xw.qxypt.modules.entity.LhpInstallationPointEntity;
import com.xw.qxypt.modules.service.LhpInstallationPointService;
import com.xw.qxypt.modules.util.BaseTree;
import com.xw.qxypt.modules.util.R;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;


/**
 * 安装点管理
 *
 * @author xw
 * @email 
 * @date 2019-11-28 16:38:08
 */
@RestController
@RequestMapping("baseinfo/lhpinstallationpoint")
public class LhpInstallationPointController {
    @Autowired
    private LhpInstallationPointService lhpInstallationPointService;

    /**
     * 信息
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") String id){
        LhpInstallationPointEntity lhpInstallationPoint = lhpInstallationPointService.getById(id);
        return R.ok().put("lhpInstallationPoint", lhpInstallationPoint);
    }


    /**
     * 路段--安装点树
     */
    @RequestMapping("/pointTree")
    public List<BaseTree> pointTree(){
        return lhpInstallationPointService.pointTree();
    }

}
